<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Understanding The AutoIndex Workflow</title>
<link rel="stylesheet" href="../../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.77.1">
<link rel="home" href="../index.html" title="Boost.AutoIndex">
<link rel="up" href="../index.html" title="Boost.AutoIndex">
<link rel="prev" href="script_ref.html" title="Script File (.idx) Reference">
<link rel="next" href="xml.html" title="XML Handling">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../boost.png"></td>
<td align="center"><a href="../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="script_ref.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="xml.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="boost_autoindex.workflow"></a><a class="link" href="workflow.html" title="Understanding The AutoIndex Workflow">Understanding The AutoIndex Workflow</a>
</h2></div></div></div>
<div class="orderedlist"><ol class="orderedlist" type="1">
<li class="listitem">
          Load the script file (usually index.idx) and process it one line at a time,
          producing one or more index term per (non-comment) line.
        </li>
<li class="listitem">
          Reading all lines builds a list of <span class="emphasis"><em>terms to index</em></span>.
          Some of those may be terms defined (by you) directly in the script file,
          others may be terms found by scanning C++ header and source files that
          were specified by the <span class="emphasis"><em>!scan-path</em></span> directive.
        </li>
<li class="listitem">
          Once the complete list of <span class="emphasis"><em>terms to index</em></span> is complete,
          it loads the Docbook XML file. (If this comes from Quickbook/Doxygen/Boostbook/Docbook
          then this is the complete documentation after conversion to Docbook format).
        </li>
<li class="listitem">
          AutoIndex builds an internal <a href="http://en.wikipedia.org/wiki/Document_Object_Model" target="_top">Document
          Object Model (DOM)</a> of the Docbook XML. This internal representation
          then gets scanned for occurrences of the <span class="emphasis"><em>terms to index</em></span>.
          This scanning works at the XML paragraph level (or equivalent sibling such
          as a table or code block) - so all the XML encoding within a paragraph
          gets flattened to plain text.<br> This flattening means the regular expressions
          used to search for <span class="emphasis"><em>terms to index</em></span> can find anything
          that is completely contained within a paragraph (or code block etc).
        </li>
<li class="listitem">
          For each term found then an <span class="emphasis"><em>indexterm</em></span> Docbook element
          is inserted into the <a href="http://en.wikipedia.org/wiki/Document_Object_Model" target="_top">Document
          Object Model (DOM)</a> (provided internal index generation is off),
        </li>
<li class="listitem">
          Also the AutoIndex's internal index representation gets updated.
        </li>
<li class="listitem">
          Once the whole XML document has been indexed, then, if AutoIndex has been
          instructed to generate the index itself, it creates the necessary XML and
          inserts this into the <a href="http://en.wikipedia.org/wiki/Document_Object_Model" target="_top">Document
          Object Model (DOM)</a>.
        </li>
<li class="listitem">
          Finally the whole <a href="http://en.wikipedia.org/wiki/Document_Object_Model" target="_top">Document
          Object Model (DOM)</a> is written out as a new Docbook XML file, and
          normal processing of this continues via the XSL stylesheets (with xsltproc)
          to actually build the final human-readable docs.
        </li>
</ol></div>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright &#169; 2008, 2011 John Maddock<p>
        Distributed under the Boost Software License, Version 1.0. (See accompanying
        file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
      </p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="script_ref.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="xml.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>
